<?php
/**
 * Created by PhpStorm.
 * User: tsang
 * Date: 2018/3/14
 * Time: 19:01
 */

namespace app\api\controller;
use think\Request;

class Index extends Base
{
    protected $Index; // 首页逻辑操作类

    public function __construct(Request $request)
    {
        parent::__construct($request);
        $this->Index = new \app\api\logic\Index($this->requestData);//逻辑业务
    }

    //检查权限作用域
    protected $beforeActionList  = [
        'checkPrimaryScope' => ['only' => ''],
    ];

    /**
     * 首页推广
     * @author tsang
     */
    public function ad(){
        return $this->ajaxReturn(
            $this->Index->ad()
        );
    }

    /**
     * 首页推广
     * @author tsang
     */
    public function ad_detail(){
        return $this->ajaxReturn(
            $this->Index->ad_detail()
        );
    }

    /**
     * 轮播图
     * @author tsang
     */
    public function banner(){
        return $this->ajaxReturn(
            $this->Index->banner()
        );
    }





}